/********************************************************************
* Copyright (c) 2013,TGS,All rights reserved.
* fileName:	MapToolEmitPoint.h	
* created:	2013/04/26 16:41

* version:	1.6
* detail: 
*********************************************************************/

#pragma once


#include "MapTool.h"

namespace TGS{
namespace MapControl{

class MapCanvas;

/** \ingroup gui
 * A map tool that simply emits a point when clicking on the map.
 * Connecting a slot to its canvasClicked() signal will
 * let you implement custom behaviour for the passed in point.
 */
class  MapToolEmitPoint : public MapTool
{
    Q_OBJECT

  public:
    //! constructor
    MapToolEmitPoint( MapCanvas* canvas );

    //! Overridden mouse move event
    virtual void canvasMoveEvent( QMouseEvent * e );

    //! Overridden mouse press event - emits the signal
    virtual void canvasPressEvent( QMouseEvent * e );

    //! Overridden mouse release event
    virtual void canvasReleaseEvent( QMouseEvent * e );

  signals:

    //! signal emitted on canvas click
    // \note changed in 1.3
    void canvasClicked( const Point& point, Qt::MouseButton button );
};

}//MapControl
}//TGS
